﻿/*
=============================================================================
Author:魏宝辉通过CodeSmithe生成
CreatedTime:2012-10-31
Description:System_Log三层结构数据访问层
=============================================================================
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using PWMIS.DataMap.Entity;
using FTchina.Models;//引入模型层
namespace FTchina.DAL
{
	public static partial class System_LogService
	{
		 
	 
			
		public static int DeleteSystem_LogById(long id)	
		{     
            System_Log system_Log = new System_Log();
            system_Log.Id = id;
            EntityQuery<System_Log> query = new EntityQuery<System_Log>(system_Log);
             return query.Delete(system_Log);
		}	
        
          //以标识列获得对象
        public static System_Log GetSystem_LogById(long  id)
        {
            System_Log system_Log = new System_Log();
            system_Log.Id = id;
            EntityQuery<System_Log> query = new EntityQuery<System_Log>(system_Log);
            query.FillEntity(system_Log);
            return system_Log;
        }
		
	 
	 
       
        
        
        
		 
		 
		 public static int AddOrUpdateSystem_Log(System_Log system_Log)
        {
            System_Log _system_Log = new System_Log();

            EntityQuery<System_Log> query = new EntityQuery<System_Log>(_system_Log);
           _system_Log= system_Log;
           int i=(system_Log.Id==0)?
                 query.Insert(_system_Log): query.Update(_system_Log);
            return i;
        }
		
		 
	}
}

